<?php
define('IN_RJ_ADMIN', true);
include("../includes/_config.php");
include("../includes/_functions.php");
if (isset($_POST["submit"])) {
	$name = addslashes($_POST['name']);
	$password = md5(md5((stripslashes($_POST['password']))));
	$q = $DB->query("SELECT u_id FROM ".$conf['prefix']."user WHERE u_name = '".$name."' AND u_password = '".$password."' AND (u_level = 1 OR u_level = 2)");
	if ($DB->num_rows($q)) {
		$r = $DB->fetch_row($q);
		$_SESSION['admin_id'] = $r['u_id'];	
	}
header("Location: ./");
}
?>
